Adding captions to on-demand subreports

To further organize a report, captions can be created for the Subreport Preview tab and for the placeholder frame of an on-demand subreport.

Captions are written by using formulas. Both placeholder frame captions and Subreport Preview tab captions can include field names from the main report.

A tab text caption replaces the subreport file name caption on the Subreport Preview tab.

Note:    Placeholder frame captions only apply to on-demand subreports, while tab text captions apply to both on-demand subreports and regular subreports. Since the data from a regular subreport is visible on the Preview tab, there is no need for a frame caption when you format a regular subreport.

To add a caption
  1. Select the subreport and click the Format button on the Supplementary toolbar.

    The Format Editor dialog box appears.

  2. Click the Subreport Tab.
  3. You can enter either an on-demand subreport caption or a tab text caption by clicking the appropriate Formula button and opening the Format Formula Editor.
  4. Enter your formula in the Formula text box.

    Crystal syntax formula example:

    "More Information About " + {Customer.Customer Name}

    Basic syntax formula example:

    formula = "More Information About" + {Customer.Customer Name}

    Using the Xtreme.mdb sample database, these formulas would give you a caption like "More Information About Pathfinders" or "More Information About Rockshocks for Jocks."

  5. Click Check to check the formula for errors. If the program finds an error, it will prompt you with a message box detailing the nature of the error.
  6. After fixing any errors, click Save and Close.
  7. Click OK to return to the report.

Note:    A tab text formula is only evaluated when you drill-down on a subreport. If you preview a subreport separately from the primary report, the formula will not be evaluated.



Seagate Software IMG Holdings, Inc.
http://www.seagatesoftware.com
Support services:
http://support.seagatesoftware.com